package com.example.express.util;

import java.sql.Timestamp;
import java.util.*;

public class Util {
    private static Map<String, Map<String, String>> router = new HashMap<>();

    public static Map<String, Map<String, String>> initRouter() {
        if (router.size() != 0) {
            return  router;
        }
        List<String> current = Arrays.asList("A", "B", "C");

        for (String s : current) {
            Map<String, String> t = new HashMap<>();
            t.put("X", "D");
            t.put("Y", "D");
            t.put("Z", "D");
            router.put(s, t);
        }

        return router;
    }

    public static String genOrderNumber() {
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());

        return timestamp.toString();
    }
}
